//
// CNoise3d.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

public class CNoise3d {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CNoise3d(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CNoise3d obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CNoise3d(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CNoise3d(IDriver pDriver) {
    this(nel3dJNI.new_CNoise3d(IDriver.getCPtr(pDriver), pDriver), true);
  }

  public void init(long w, long h, long d) {
    nel3dJNI.CNoise3d_init__SWIG_0(swigCPtr, this, w, h, d);
  }

  public void init(long w, long h) {
    nel3dJNI.CNoise3d_init__SWIG_1(swigCPtr, this, w, h);
  }

  public void init(long w) {
    nel3dJNI.CNoise3d_init__SWIG_2(swigCPtr, this, w);
  }

  public void init() {
    nel3dJNI.CNoise3d_init__SWIG_3(swigCPtr, this);
  }

  public void render(SWIGTYPE_p_NLMISC__CQuadUV qc, float wpos, float intensity) {
    nel3dJNI.CNoise3d_render(swigCPtr, this, SWIGTYPE_p_NLMISC__CQuadUV.getCPtr(qc), wpos, intensity);
  }

  public void render2passes(SWIGTYPE_p_NLMISC__CQuadUV qc, float wpos, float intensity) {
    nel3dJNI.CNoise3d_render2passes(swigCPtr, this, SWIGTYPE_p_NLMISC__CQuadUV.getCPtr(qc), wpos, intensity);
  }

  public void renderGrid(long nbw, long nbh, long w, long h, float UStart, float VStart, float WStart, float dU, float dV, float dW, float intensity) {
    nel3dJNI.CNoise3d_renderGrid(swigCPtr, this, nbw, nbh, w, h, UStart, VStart, WStart, dU, dV, dW, intensity);
  }

  public void renderGrid2passes(long nbw, long nbh, long w, long h, float UStart, float VStart, float WStart, float dU, float dV, float dW, float intensity) {
    nel3dJNI.CNoise3d_renderGrid2passes(swigCPtr, this, nbw, nbh, w, h, UStart, VStart, WStart, dU, dV, dW, intensity);
  }

  public void flush() {
    nel3dJNI.CNoise3d_flush(swigCPtr, this);
  }

  public void flush2passes() {
    nel3dJNI.CNoise3d_flush2passes(swigCPtr, this);
  }

  public long getWidth() {
    return nel3dJNI.CNoise3d_getWidth(swigCPtr, this);
  }

  public long getHeight() {
    return nel3dJNI.CNoise3d_getHeight(swigCPtr, this);
  }

  public long getDepth() {
    return nel3dJNI.CNoise3d_getDepth(swigCPtr, this);
  }

}
